import { instance } from "../utils/request";
const getAccountsPagination = async (params) => {
	return await instance.get("/Accounts/Pagination", params);
};

const addAccounts = async (data) => {
	return await instance.post("/Accounts/Add", data);
};

const updateAccounts = async (data) => {
	return await instance.post("/Accounts/Update", data);
};

const getAccountsDetail = async (id) => {
	return await instance.get("/Accounts/Detail", { id : id });
};

const deleteAccounts = async (id) => {
	return await instance.post("/Accounts/Delete", { id : id });
};

const accountsApi = {
	getAccountsPagination,
	addAccounts,
	updateAccounts,
	getAccountsDetail,
	deleteAccounts,
};

export default accountsApi
